home *** CD-ROM | disk | FTP | other *** search
INSTALL Professional project | 1999-01-31 | 14.8 KB | 651 lines |
- /*
- * Command AntiVirus Installation Program
- * Copyright (C) 1993,94,95 Command Software Systems
- *
- * Edited by Command Software GC,SPB
- * Date = June 13,1995
- * #Disk = 1
- */
- @DefineProject
- @Name = "Command AntiVirus for DOS"
- @Version = "4.54 SP1"
- @OutDrive = C // DRIVE
- @SubDir = "\\F-PROT" // DIRECTORY
- @EndProject
-
- @DefineVars
-
- /*
- * SILENT specifies no interaction, defaults are automatically used
- * and no pauses are used. INTERACT allows the user to answer questions
- * involving the installation
- */
- @QString @Mode = "INTERACT" // SILENT, INTERACT
-
- /* Specifies whether Command AntiVirus is to be installed or not, the indented
- * section is the section that if YES is answered to this question, the
- * following values will be taken into account, if NO then the
- * following values will automatically be omitted */
- @QString @FPInst = "YES" // YES,NO
-
- /* Specifies whether or not to load the DOS interface for the Command AntiVirus
- * program */
- @QString @FPDOS = "YES" // YES, NO
-
- /* Specifies whether or not to load Command AntiVirus from the AUTOEXEC.BAT */
- @QString @FPAuto = "YES" // YES, NO
-
- /* Do you want to install the utilities */
- @QString @UtilInst = "YES"
-
- /* Do you want to install the Data Integrity Checker, CHECK */
- @QString @UtilCheck = "YES"
-
- /* Do you want to install the LOGIN.COM file so you can load TSR's
- * ( VIRSTOP )from the system login script */
- @QString @UtilLogin = "NO"
-
- /* Do you want to install the software REBOOT program */
- @QString @UtilReboot = "YES"
-
- /* Do you wish to install the Command AntiVirus batch files */
- @QString @UtilBatch = "YES"
-
- /* Sets the FPDATA path including the FILENAME. Use skip as an
- * option if you do not want this set command in your AUTOEXEC.BAT */
- @QString @FPData = "SKIP" // SKIP, [PATH,FILENAME]
-
- /* Settings for the Command AntiVirus placed in the AUTOEXEC.BAT file */
- @QString @FPOptions = "/HARD /TODAY" //FP manual pg.19
-
- /* This sets the modify your boot up files options: YES, Command AntiVirus goes
- * ahead and changes your AUTOEXEC.BAT and CONFIG.SYS, NO, Command AntiVirus does
- * not, SAVE Command AntiVirus saves the changes to a file with the extension NEW(
- * AUTOEXEC.NEW, CONFIG.NEW ) for later. */
- @QString @ModifyBoot = "YES" // YES, NO, SAVE
-
- /* @BatSetup if set to true will place lines for the AUTOEXEC.BAT
- * file above the last line in the AUTOEXEC.BAT file; if set to false
- * it will place lines at the bottom of the AUTOEXEC.BAT file.*/
- @Integer @Batsetup = @TRUE
-
- @QString @Foreign = "YES"
- @QString @Core = "NO"
-
- /* In house use, should not be touched */
- @QString @ModAuto = "NO"
- @QString @GetWin = " "
- @QString @ZIPOPT = ""
- @EndVars
-
-
-
- // Main code section
- WELCOME:
-
- // Check if the windir env. var. is being used
- @GetWin = @GetEnv "windir"
-
- // If it is assume Windows is in Memory
- @If( @StrLen( @GetWin ) > 3 )
- @Display
- @CLS
-
- Installation of @Name onto platforms other than DOS is not supported.
- If you have purchased the wrong product, please contact your software provider.
-
- @Pause
- @EndDisplay
- @Exit
- @Endif
-
- // Check if the silent mode was used
- @If( @StrFind( @Mode, "SILENT")==0)
-
- // If so, skip interaction
- @Goto Install
-
- @Endif // Else continue with program
-
-
- @Display
- @Cls
-
- Command AntiVirus @Version
-
- Welcome to the @Name installation program!
- This program will install @Name v@Version
- on your computer. To continue this installation
- press ENTER. To quit the install program at any time
- press ESC.
-
- @PAUSE
- @EndDisplay
-
- // Main menu
- MAIN:
-
- // Display the main screen
- @FlushGroups()
- @GetGroups
- @CLS
- @Name v@Version Installation
-
- CSAV Directory ---- @OutDrive:@SubDir
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
- bar to the desired menu selection and then press [Enter].
- @Endif @Set i = " INSTALL Command AntiVirus "
- @Set d = "Customize Command AntiVirus Directory"
- @Set f = "Customize Command AntiVirus DOS Options"
- @Set u = "Customize Utility/Integrity Options"
- @LocalWindow( 12, 36 )
- @EndGroups
- @if ('d' [= @Group)
- @ClearGroup(d)
- @Goto FPDir
- @EndIf
- @if ('f' [= @Group)
- @ClearGroup(f)
- @Goto FPROT
- @EndIf
- @if ('u' [= @Group)
- @ClearGroup(u)
- @Goto UTIL
- @EndIf
- @if('i' [= @Group)
- @ClearGroup(i)
- @Goto Install
- @EndIf
- @Goto MAIN // GO BACK TO MAIN MENU
-
- FPDir:
- @FlushGroups()
- @GetGroups
- @CLS
- @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
- CSAV Drive : @OutDrive
- CSAV Directory : @SubDir
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
- bar to the desired menu selection and then press [Enter].
- @Set m = "Return to Main Menu"
- @Set f = "Command AntiVirus Drive"
- @Set p = "Command AntiVirus Directory"
- @LocalWindow( 12, 39 )
- @EndGroups
- @If ( 'f' [= @Group )
- @ClearGroup(f)
- @Goto FPDRIVE
- @Endif
- @If ( 'p' [= @Group )
- @ClearGroup(p)
- @Goto FPDirect
- @Endif
- @If ( 'm' [= @Group )
- @ClearGroup(m)
- @Goto Main
- @Endif
- @Goto FPDir
-
- FPDRIVE:
- @GetOutDrive @OutDrive // get the output drive
- @Suppress A // skip A
- @Suppress B // skip B
- @CLS
- @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
- @MoveCStr( 2,2,11, "CSAV Drive : @OutDrive")
- CSAV Directory : @SubDir
-
-
-
-
-
-
-
-
-
-
-
-
-
- Please select the drive to install @Name.
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
- bar to the disk drive to install to and then press [Enter].
- @LocalWindow( 10, 38 )
- @EndOutDrive
-
- @Goto FPDir
-
- FPDirect:
- @GetSubdir @SubDir
- @CLS
- @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
- CSAV Drive : @OutDrive
- @MoveCStr( 3,2,11, "CSAV Directory : @SubDir")
-
-
-
-
- @Default = "@SubDir" // GET THE DIRECTORY
- @Prompt = "Enter the name of the sub-directory for Command AntiVirus"
- @EndSubdir
- @Goto FPDir
-
-
- FPROT:
- @FlushGroups()
- @GetGroups
- @CLS
- @MoveCStr( 1,3,30, "Command AntiVirus v@Version")
- Command AntiVirus for DOS : @FPDOS
- Command AntiVirus in AUTOEXEC: @FPAUTO
-
-
-
-
-
-
-
-
-
-
-
- Press Enter when the selection is highlighted to toggle the selection
- between YES and NO. The current setting of the item is located in the
- upper left hand corner.
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
- bar to the desired option and then press [Enter] to toggle YES or NO.
- @Set m = "Return to Main Menu"
- @Set f = "Command AntiVirus for DOS"
- @Set w = "Command AntiVirus in AUTOEXEC"
- @LocalWindow( 10, 39 )
- @EndGroups
- @If ( 'f' [= @Group )
- @ClearGroup(f)
- @If( @StrFind( @FPDOS, "YES")==0)
- @FPDOS="NO"
- @Else
- @FPDOS = "YES"
- @Endif
- @Goto FPROT
- @Endif
- @If ( 'w' [= @Group )
- @ClearGroup(w)
- @If( @StrFind( @FPAUTO, "YES")==0)
- @FPAUTO="NO"
- @Else
- @FPAUTO = "YES"
- @Goto BatchSetup
- @Endif
- @Goto FPROT
- @Endif
- @If ( 'm' [= @Group )
- @ClearGroup(m)
- @Goto Main
- @Endif
- @Goto FPROT
-
- BatchSetup:
- @FlushGroups()
- @GetGroups
- @CLS
-
- Does your computer boot to Microsoft Windows or a menu system?
-
-
-
-
-
-
-
-
-
-
-
-
- If you answer "Yes" lines will be added just before the last line of
- your AUTOEXEC.BAT. If you answer "No", then the lines will be added
- at the end of your AUTOEXEC.BAT.
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move
- the bar to the option you wish to choose and then press [Enter].
- @LocalWindow(10,38)
- @Set a = "Yes"
- @Set b = "No"
- @Endgroups
- @If ('a' [= @Group)
- @BatSetup = @True
- @Else
- @BatSetup = @False
- @EndIf
- @Goto FPROT
-
- UTIL:
- @FlushGroups()
- @GetGroups
- @CLS
- @MoveCStr( 1,3,30, "Command AntiVirus v@Version")
- Integrity Checker : @UtilCheck
- REBOOT.COM : @UtilReboot
- BATCH files : @UtilBatch
-
-
-
-
-
-
-
-
-
- Press Enter when the selection is highlighted to toggle the selection
- between YES and NO. The current setting of the item is located in the
- upper left hand corner.
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
- bar to the desired option and then press [Enter] to toggle YES or NO.
- @Set m = "Return to Main Menu"
- @Set f = "Integrity Checker"
- @Set r = "REBOOT.COM"
- @Set b = "BATCH Files"
- @LocalWindow( 11, 39 )
- @EndGroups
- @If ( 'f' [= @Group )
- @ClearGroup(f)
- @If( @StrFind( @UtilCheck, "YES")==0)
- @UtilCheck="NO"
- @Else
- @UtilCheck = "YES"
- @Endif
- @Goto UTIL
- @Endif
- @If ( 'b' [= @Group )
- @ClearGroup(b)
- @If( @StrFind( @UtilBatch, "YES")==0)
- @UtilBatch="NO"
- @Else
- @UtilBatch="YES"
- @Endif
- @Goto UTIL
- @Endif
- @If ( 'r' [= @Group )
- @ClearGroup(r)
- @If( @StrFind( @UtilReboot, "YES")==0)
- @UtilReboot="NO"
- @Else
- @UtilReboot = "YES"
- @Endif
- @Goto UTIL
- @Endif
- @If ( 'm' [= @Group )
- @ClearGroup(m)
- @Goto Main
- @Endif
- @Goto UTIL
-
- Install:
-
- @If( @DiskFree(@OutDrive) < 2000k)
- @GetGroups
- @CLS
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @OutDrive drive does not have enough memory to install this program.
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
- bar to the option you wish to choose and then press [Enter].
- @LocalWindow( 10, 38)
- @Set a = "Cancel Install"
- @Set b = "Change Drive"
- @EndGroups
- @if ( 'a' [= @Group )
- @Exit
- @EndIf
- @if ( 'b' [= @Group )
- @Goto MAIN
- @EndIf
- @Endif
-
- @If(@StrFind( @Mode, "SILENT")!=0)
- @If (@Exists "@OutDrive:\\@SubDir\\SIGN.DEF")
- @FlushGroups()
- @GetGroups
- @CLS
- Existing Version of Command AntiVirus found
-
-
-
-
-
-
-
-
-
- @Name appears to be installed in:
- @MoveCStr(12,4,30,"@OutDrive:@SubDir")
-
- Select @MoveCStr(14,11, 30, "Continue")if you are installing an update or have some
- files you wish to re-install, @MoveCStr( 15, 34, 30, "Change Directory" )to make a new
- directory to install Command AntiVirus, or @MoveCStr( 16, 47, 30, "Cancel" )to quit the install.
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move
- the bar to the option you wish to choose and then press [Enter].
- @LocalWindow(7, 38)
- @Set c = "Continue"
- @Set d = "Change Directory"
- @Set q = "Cancel Install"
-
- @EndGroups
- @If ('c'[= @Group )
- @Endif
- @If ('d' [= @Group )
- @Goto MAIN
- @Endif
- @If ( 'q' [= @Group )
- @Exit
- @EndIf
- @Endif
- @Endif
-
- FILEDO:
-
- /* Write the files from Disk1 to Destination */
- Disk1:
- @ChDrive @OutDrive
- @MkDir("@OutDrive:\\@SubDir")
-
- @If( @StrFind( @UtilBatch,"YES")==0)
- @DefineDisk
- @Label = "Disk 1 of 1"
- @File SE_SCAN.EXE
- @EndDisk
- @Endif
-
- @If( @StrFind( @UtilCheck, "YES")==0)
- @DefineDisk
- @Label = "Disk 1 of 1"
- @File SE_CHCK.EXE
- @EndDisk
- @EndIf
-
- @If( @StrFind( @UtilReboot,"YES")==0)
- @DefineDisk
- @Label = "Disk 1 of 1"
- @File REBOOT.COM
- @EndDisk
- @Endif
-
- @DefineDisk
- @Label = "Disk 1 of 1"
- @File COMEXIT.COM
- @File FPUNZIP.BAT
- @File FIND.EXE
- @EndDisk
-
- @If( @StrFind( @FPDOS, "YES")==0)
- @DefineDisk
- @Label = "Disk 1 of 1"
- @File README.TXT
- @File VIR-HELP.ENG
- @File Rescue.bat
- @EndDisk
- @Endif
-
- @If( @StrFind( @FPDOS, "YES")==0)
- @DefineDisk
- @Label = "Disk 1 of 1"
- @File MACRO.DEF
- @File FIXDISK.EXE
- @File F-PROT.EXE
- @File ENGLISH.TX1
- @File ENGLISH.TX0
- @File AUTOEXEC.FPT
- @File SIGN.DEF
- @EndDisk
- @If( @StrFind( @Foreign, "YES") == 0)
- @Copy("@StartupDrive:@StartupDir\\*.TX0","@OutDrive:@SubDir\\*.TX0")
- @Endif
- @Endif
-
- @If( @StrFind( @FPAuto,"YES" )==0 )
- @If( @StrFind( @FPDOS, "YES")==0)
- @FPAuto="AUTO"
- @ModAuto="YES"
- @Endif
- @Endif
-
- @If( @StrFind( @ModAuto,"YES")==0)
- @If( @StrFind( @Mode, "SILENT")!=0)
- @FlushGroups()
- @GetGroups
- @CLS
- AUTOEXEC.BAT Changes
-
- @If( @StrFind( @FPAUTO, "AUTO")==0) @OutDrive:@SubDir\F-PROT @FPOptions @Endif
-
-
-
-
-
-
-
-
-
- These are the changes to be made to the AUTOEXEC.BAT. One can have
- INSTALL make the changes, have INSTALL save the changes to a file for
- future consideration, or discard the changes needed to be made.
-
- Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
- bar to the option you wish to choose and then press [Enter].
- @LocalWindow( 9, 38) @Set a = "Make Changes to AUTOEXEC.BAT"
- @Set b = "Save Changes to AUTOEXEC.FPT"
- @Set c = "Discard Changes"
- @EndGroups
- @if ( 'a' [= @Group )
- @ModifyBoot="YES"
- @Endif
- @if ( 'b' [= @Group )
- @ModifyBoot="SAVE"
- @Endif
- @If ( 'c' [= @Group )
- @ModifyBoot="NO"
- @Endif
- @Endif
-
- @If( @StrFind( @ModifyBoot,"NO")!=0)
- @SetAutoexec
- @If( @StrFind( @ModifyBoot, "YES")==0)
- @Overwrite
- @Else
- @DiskProto
- @Endif
- @If(@BatSetup)
- @AUTOINSERTNEXTTOLAST
- @Else
- @AUTOINSERTLAST
- @Endif
- @If ( @StrFind ( @FPDATA, "SKIP" ) != 0 )
- @Verbatim "Set FP-Data=@FPDATA"
- @EndIf
- @If( @StrFind( @FPAUTO, "AUTO")==0)
- @Verbatim "@OutDrive:@SubDir\\F-PROT @FPOptions"
- @Path = "@OutDrive:@SubDir;"
- @Endif
- @EndAutoexec
- @Endif
- @Endif
-
- END:
- /* Conclusionary code */
- @Finish
-
- @If( @StrFind( @Core, "YES")==0)
- @If( @StrFind( @Foreign, "YES") == 0)
- @Copy("@StartupDrive:@StartupDir\\*.TX0","@OutDrive:@SubDir\\*.TX0")
- @Endif
- @Endif
-
- @CLS
- @If( @StrFind( @Mode, "SILENT")!=0)
- @CLS
- Thank you for choosing Command Software Systems!
-
- Should @Name report a virus, please refer
- to your documentation for instructions on how to proceed.
-
- Install will now decompress the Command AntiVirus files in the
- destination directory.
-
- @Pause
- @EndIf
-
- @ChDrive @OutDrive
- @ChDir "@SubDir"
- @If( @StrFind( @ModifyBoot, "YES" )!=0)
- @Execute("COMEXIT.COM NOREBOOT")
- @Else
- @Execute("COMEXIT.COM @ZIPOPT")
- @Endif
- @EndFinish
-